package com.fmdj.customer.feign;

import com.fmdj.common.util.CommonResult;
import com.fmdj.customer.controller.form.*;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(name = "fmdj-odr")
public interface OdrServiceApi {

    @PostMapping("/order/insertOrder")
    public CommonResult insertOrder(InsertOrderForm form);

    @PostMapping("/order/searchOrderStatus")
    public CommonResult searchOrderStatus(SearchOrderStatusForm form);

    @PostMapping("/order/deleteUnAcceptOrder")
    public CommonResult deleteUnAcceptOrder(DeleteUnAcceptOrderForm form);

    @PostMapping("/order/hasCustomerCurrentOrder")
    public CommonResult hasCustomerCurrentOrder(HasCustomerCurrentOrderForm form);

    @PostMapping("/order/searchOrderForMoveById")
    public CommonResult searchOrderForMoveById(SearchOrderForMoveByIdForm form);

    @PostMapping("/order/confirmArriveStartPlace")
    public CommonResult confirmArriveStartPlace(ConfirmArriveStartPlaceForm form);

    @PostMapping("/order/searchOrderById")
    public CommonResult searchOrderById(@RequestBody @Valid SearchOrderByIdForm form);

    @PostMapping("/order/validCanPayOrder")
    public CommonResult validCanPayOrder(@RequestBody @Valid ValidCanPayOrderForm form);

    @PostMapping("/order/updateOrderPrepayId")
    public CommonResult updateOrderPrepayId(@RequestBody @Valid UpdateOrderPrepayIdForm form);

    @PostMapping("/bill/updateBillPayment")
    public CommonResult updateBillPayment(@RequestBody @Valid UpdateBillPaymentForm form);

    @PostMapping("/order/updateOrderAboutPayment")
    public CommonResult updateOrderAboutPayment(@RequestBody @Valid UpdateOrderAboutPaymentForm form);

    @PostMapping("/comment/insertComment")
    public CommonResult insertComment(@RequestBody @Valid InsertCommentForm form);

    @PostMapping("/order/searchCustomerOrderByPage")
    public CommonResult searchCustomerOrderByPage(@RequestBody @Valid SearchCustomerOrderByPageForm form);

    @PostMapping("/comment/searchCommentByOrderId")
    public CommonResult searchCommentByOrderId(@RequestBody @Valid SearchCommentByOrderIdForm form);

}
